<%@page import="helpers.StringHelper"%>
<%@page import="helpers.UrlHelper"%>
<%@page import="entities.Domain"%>
<% 
String name  = (String) request.getAttribute("name");
Domain domain = (Domain) request.getAttribute("domain");
String error = (String) request.getAttribute("error");

//Set content for Seo
String title = "Check Whois - a " + UrlHelper.getDomainServer(request) + " tool FREE";
String description = "Tool allows persons to obtain information related to the registration records of existing domain names. This is a " + UrlHelper.getDomainServer(request) + " tool FREE";
String keywords = "whois, check whois, whois domain, show domain, domain, domain show";
String url = UrlHelper.getServerUrl(request) + "/checkwhois";

if (domain != null) {
	title = "Check whois  " + domain.getDomain() + " information in " + UrlHelper.getDomainServer(request);
	description = domain.getDomain() + " has whois information is " + StringHelper.cutString(StringHelper.html2text(domain.getWhois()), 30); 
	keywords = domain.getDomain() + ", " + keywords;
	url = url + "?q=" + domain.getDomain();
}

%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<jsp:include page="/layouts/header.jsp">
	<jsp:param name="title" value="<%=title %>" />
    <jsp:param name="description" value="<%=description %>" />
    <jsp:param name="keywords" value="<%=keywords %>" />
    <jsp:param name="ogtitle" value="<%=title %>" />
    <jsp:param name="ogurl" value="<%=url %>" />
    <jsp:param name="ogdescription" value="<%=description%>" />
</jsp:include>

	<script type="text/javascript" src="/js/check_whois.js"></script>
	
	<div id="content">
		<jsp:include page="/elements/search_bar.jsp" />
		
		<div class="row">
			<!-- Left Content BEGIN -->
			<div class="span9">
				<section class="check-page">
					<div class="box1 block">
						<h3 class="title">Check Whois</h3>
						<div class="row-fluid border-space">
							<div class="span6 search-bar2">
								<div class="item-stream unstyled search-input-stream">
									<div class="stream-item stream-header search-input-item">
										<form class="form-inline search-form" action="/checkwhois">
											<input type="text" value="" placeholder="ex: google.com" name="q" id="artist_search" class="xlarge ui-autocomplete-input" role="textbox">
					          				<button type="submit" id="artist_submit" class="btn btn-large btn-inverse"><i class="icon-search icon-white"></i></button>
										</form>
									</div>
								</div>
							</div>
						</div>

						<div class="result">
							<% if (name == null) { %>
								<p>Please enter a domain name.</p>
							<% } %>
							<br />
							<div class="adv">
								<script type="text/javascript"><!--
								google_ad_client = "ca-pub-4975603569119809";
								/* showdomain 468x60 */
								google_ad_slot = "3934035319";
								google_ad_width = 468;
								google_ad_height = 60;
								//-->
								</script>
								<script type="text/javascript"
								src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
								</script>
							</div>
							<% if (domain != null) { %>
							<section class="ip-result">
								<div class="block">
									<h3 class="title">Whois <%=domain.getDomain() %> Info</h3>
									<div class="adv left">
										<script type="text/javascript"><!--
										google_ad_client = "ca-pub-4975603569119809";
										/* showdomain 468x15 */
										google_ad_slot = "8143908917";
										google_ad_width = 468;
										google_ad_height = 15;
										//-->
										</script>
										<script type="text/javascript"
										src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
										</script>
									</div>
									<div class="content-block">
										<div class="row-fluid f-info">
											<div class="span12">
												<ul>
													<li>
														<div class="adv pull-right">
															<script type="text/javascript"><!--
															google_ad_client = "ca-pub-4975603569119809";
															/* showdomain 200x200 */
															google_ad_slot = "8364234917";
															google_ad_width = 200;
															google_ad_height = 200;
															//-->
															</script>
															<script type="text/javascript"
															src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
															</script>
														</div>
														<%=domain.getWhois() %>
													</li>
												</ul>
											</div>
										</div>
									</div>
								</div>
								
							</section>
							<% } %>
						</div>
					</div>
				</section>
			</div>
			<!-- Left Content END -->
			
			<jsp:include page="/elements/right.jsp" />
		</div>
		
		
	</div>
		
<jsp:include page="/layouts/footer.jsp" />